*******************************************************
* Paper: Coordination with and without incentives
* Author: Diego Andrés Jorrat
* Co-authors: Pablo Brañas-Garza, Diego Jorrat, Pablo Lomas
* Date: 17 March 2026
*
* This do-file is prepared for submission purposes.
* It contains all steps required to reproduce the
* empirical results reported in the paper.
*
* Contents:
* - Table A1: Balance tests and coordination problem
* - Table A2: Effect of hypothetical incentives in Study 1
* - Table A3: Effect of hypothetical incentives in Study 2
*   controlling for game order
*******************************************************

*-----------------------------------------------------*
* 0. Set working directory
*-----------------------------------------------------*
* Please modify the global directory below so that it
* matches the location of the reproducibility package
* on the user's computer.

global directory "/Users/pablodelomas/Desktop/"

* Set working directory
cd "$directory"

* Install necessary packages
cap which baltable
if _rc {
    net install baltable, from("http://digital.cgdev.org/doc/stata/MO/Misc/") replace
}

cap which outreg2
if _rc {
    ssc install outreg2, replace
}

*-----------------------------------------------------*
* 1. Import data
*-----------------------------------------------------*
* We load the cleaned analytical dataset used in the paper.

use "$directory/CoordintationWithAndWithoutIncentives_basedata.dta", clear

*-----------------------------------------------------*
* 2. Variable renaming
*-----------------------------------------------------*
* We rename variables for clarity and consistency with
* the notation used in the paper.

rename st_incentive incentive
rename st_buttons_game1 p
rename st_buttons_maxp payd
rename st_buttons_game2 r
rename st_buttons_minr riskd
rename crttotal crt
rename tom_total tom
rename studio3 study1
rename studio4 study2


*-----------------------------------------------------*
* 3. Construction of key treatment variable
*-----------------------------------------------------*
* We construct an indicator for the hypothetical treatment.

gen hypothetical = .
replace hypothetical = 1 if incentive == 0
replace hypothetical = 0 if incentive == 1

*-----------------------------------------------------*
* 4. Variable labels
*-----------------------------------------------------*
* We define labels for publication-ready tables.

label var hypothetical "hypothetical (H)"
label var p "P"
label var payd "PayD"
label var r "R"
label var riskd "RiskD"
label var age "age"
label var crt "CRT"
label var tom "ToM"
label var female "female"
label var game1first "game1first (G1)"
label var study1 "study1"
label var study2 "study2"

*-----------------------------------------------------*
* 5. Session fixed effects
*-----------------------------------------------------*
* Sessions are identified by the date of the experiment.

encode datedone, gen(datedone2)

*-----------------------------------------------------*
* 6. Table A1
*-----------------------------------------------------*
* This section reproduces Appendix Table A1.
*
* First, we report balance tests by treatment status.
* Balance is assessed separately for Study 1 and Study 2.
*
* Second, we implement a random matching procedure to
* solve the coordination problem. For each study, subjects
* are randomly paired and we compute the pair-level mean
* of the coordination choices:
*   - payd  = payoff-dominant choice
*   - riskd = risk-dominant choice
*
* Fixed random seeds are used to ensure replicability.

*-----------------------------*
* 6.1 Balance tests
*-----------------------------*

recast byte hypothetical

* Study 1
baltable age crt tom female university if study1 == 1, ///
    by(hypothetical) ponly

* Study 2
baltable age crt tom female if study2 == 1, ///
    by(hypothetical) ponly


*-----------------------------*
* 6.2 Footnote number 5 of the main text - Coordination rates
*-----------------------------*

*=============================*
* Study 1
*=============================*

* Random pairing for payoff-dominant choice (PayD)
set seed 845555
gen rand_num = uniform() if study1 == 1
egen rand_rank = rank(rand_num) if study1 == 1
sort rand_rank
egen groupG1_S1 = cut(rand_rank) if study1 == 1, at(1 (2) 243) icodes
egen mean_payd_s1 = mean(payd) if study1 == 1, by(groupG1_S1)

tab mean_payd_s1

drop rand_num rand_rank

* Random pairing for risk-dominant choice (RiskD)
set seed 308
gen rand_num = uniform() if study1 == 1
egen rand_rank = rank(rand_num) if study1 == 1
sort rand_rank
egen groupG2_S1 = cut(rand_rank) if study1 == 1, at(1 (2) 243) icodes
egen mean_riskd_s1 = mean(riskd) if study1 == 1, by(groupG2_S1)

tab mean_riskd_s1

drop rand_num rand_rank


*=============================*
* Study 2
*=============================*

* Random pairing for payoff-dominant choice (PayD)
set seed 9376
gen rand_num = uniform() if study2 == 1
egen rand_rank = rank(rand_num) if study2 == 1
sort rand_rank
egen groupG1_S2 = cut(rand_rank) if study2 == 1, at(1 (2) 304) icodes
egen mean_payd_s2 = mean(payd) if study2 == 1, by(groupG1_S2)

tab mean_payd_s2

drop rand_num rand_rank

* Random pairing for risk-dominant choice (RiskD)
set seed 1744
gen rand_num = uniform() if study2 == 1
egen rand_rank = rank(rand_num) if study2 == 1
sort rand_rank
egen groupG2_S2 = cut(rand_rank) if study2 == 1, at(1 (2) 304) icodes
egen mean_riskd_s2 = mean(riskd) if study2 == 1, by(groupG2_S2)

tab mean_riskd_s2

drop rand_num rand_rank


*-----------------------------------------------------*
* 7. Table A2
*-----------------------------------------------------*
* We estimate the effect of hypothetical incentives on
* the four outcomes in Study 1. All regressions include
* session fixed effects and robust standard errors.

* Outcome: P
reg p hypothetical i.sesiones_3 if study1 == 1, vce(robust)
outreg2 using tableA2, replace excel bdec(4) stat(coef se pval) paren(se) bracket(pval) ///
    keep(hypothetical) addtext(Session FE, Yes)

reg p hypothetical age crt female i.sesiones_3 if study1 == 1, vce(robust)
outreg2 using tableA2, append excel bdec(4) stat(coef se pval) paren(se) bracket(pval) ///
    keep(hypothetical age crt female) addtext(Session FE, Yes)

* Outcome: PayD
reg payd hypothetical i.sesiones_3 if study1 == 1, vce(robust)
outreg2 using tableA2, append excel bdec(4) stat(coef se pval) paren(se) bracket(pval) ///
    keep(hypothetical) addtext(Session FE, Yes)

reg payd hypothetical age crt female i.sesiones_3 if study1 == 1, vce(robust)
outreg2 using tableA2, append excel bdec(4) stat(coef se pval) paren(se) bracket(pval) ///
    keep(hypothetical age crt female) addtext(Session FE, Yes)

* Outcome: R
reg r hypothetical i.sesiones_3 if study1 == 1, vce(robust)
outreg2 using tableA2, append excel bdec(4) stat(coef se pval) paren(se) bracket(pval) ///
    keep(hypothetical) addtext(Session FE, Yes)

reg r hypothetical age crt female i.sesiones_3 if study1 == 1, vce(robust)
outreg2 using tableA2, append excel bdec(4) stat(coef se pval) paren(se) bracket(pval) ///
    keep(hypothetical age crt female) addtext(Session FE, Yes)

* Outcome: RiskD
reg riskd hypothetical i.sesiones_3 if study1 == 1, vce(robust)
outreg2 using tableA2, append excel bdec(4) stat(coef se pval) paren(se) bracket(pval) ///
    keep(hypothetical) addtext(Session FE, Yes)

reg riskd hypothetical age crt female i.sesiones_3 if study1 == 1, vce(robust)
outreg2 using tableA2, append excel bdec(4) stat(coef se pval) paren(se) bracket(pval) ///
    keep(hypothetical age crt female) addtext(Session FE, Yes)

*-----------------------------------------------------*
* 8. Table A3
*-----------------------------------------------------*
* We estimate the effect of hypothetical incentives on
* coordination controlling for order effects in Study 2.
* Coefficients are reported in the same order as in the
* manuscript tables.

* Interaction term for the manuscript tables
capture drop hxg1
gen hxg1 = game1first * hypothetical
label var hxg1 "H x G1"

* Outcome: P
reg p hypothetical game1first i.sesiones_4 if study2 == 1, vce(robust)
outreg2 using tableA3, replace excel label bdec(4) stat(coef se pval) paren(se) bracket(pval) ///
    keep(hypothetical game1first) ///
    sortvar(hypothetical game1first) ///
    addtext(Session FE, Yes)

reg p hypothetical game1first age crt female i.sesiones_4 if study2 == 1, vce(robust)
outreg2 using tableA3, append excel label bdec(4) stat(coef se pval) paren(se) bracket(pval) ///
    keep(hypothetical game1first age crt female) ///
    sortvar(hypothetical game1first age crt female) ///
    addtext(Session FE, Yes)

reg p hypothetical game1first hxg1 i.sesiones_4 if study2 == 1, vce(robust)
outreg2 using tableA3, append excel label bdec(4) stat(coef se pval) paren(se) bracket(pval) ///
    keep(hypothetical game1first hxg1) ///
    sortvar(hypothetical game1first hxg1) ///
    addtext(Session FE, Yes)

reg p hypothetical game1first hxg1 age crt female i.sesiones_4 if study2 == 1, vce(robust)
outreg2 using tableA3, append excel label bdec(4) stat(coef se pval) paren(se) bracket(pval) ///
    keep(hypothetical game1first hxg1 age crt female) ///
    sortvar(hypothetical game1first hxg1 age crt female) ///
    addtext(Session FE, Yes)

* Outcome: PayD
reg payd hypothetical game1first i.sesiones_4 if study2 == 1, vce(robust)
outreg2 using tableA3, append excel label bdec(4) stat(coef se pval) paren(se) bracket(pval) ///
    keep(hypothetical game1first) ///
    sortvar(hypothetical game1first) ///
    addtext(Session FE, Yes)

reg payd hypothetical game1first age crt female i.sesiones_4 if study2 == 1, vce(robust)
outreg2 using tableA3, append excel label bdec(4) stat(coef se pval) paren(se) bracket(pval) ///
    keep(hypothetical game1first age crt female) ///
    sortvar(hypothetical game1first age crt female) ///
    addtext(Session FE, Yes)

reg payd hypothetical game1first hxg1 i.sesiones_4 if study2 == 1, vce(robust)
outreg2 using tableA3, append excel label bdec(4) stat(coef se pval) paren(se) bracket(pval) ///
    keep(hypothetical game1first hxg1) ///
    sortvar(hypothetical game1first hxg1) ///
    addtext(Session FE, Yes)

reg payd hypothetical game1first hxg1 age crt female i.sesiones_4 if study2 == 1, vce(robust)
outreg2 using tableA3, append excel label bdec(4) stat(coef se pval) paren(se) bracket(pval) ///
    keep(hypothetical game1first hxg1 age crt female) ///
    sortvar(hypothetical game1first hxg1 age crt female) ///
    addtext(Session FE, Yes)

* Outcome: R
reg r hypothetical game1first i.sesiones_4 if study2 == 1, vce(robust)
outreg2 using tableA3, append excel label bdec(4) stat(coef se pval) paren(se) bracket(pval) ///
    keep(hypothetical game1first) ///
    sortvar(hypothetical game1first) ///
    addtext(Session FE, Yes)

reg r hypothetical game1first age crt female i.sesiones_4 if study2 == 1, vce(robust)
outreg2 using tableA3, append excel label bdec(4) stat(coef se pval) paren(se) bracket(pval) ///
    keep(hypothetical game1first age crt female) ///
    sortvar(hypothetical game1first age crt female) ///
    addtext(Session FE, Yes)

reg r hypothetical game1first hxg1 i.sesiones_4 if study2 == 1, vce(robust)
outreg2 using tableA3, append excel label bdec(4) stat(coef se pval) paren(se) bracket(pval) ///
    keep(hypothetical game1first hxg1) ///
    sortvar(hypothetical game1first hxg1) ///
    addtext(Session FE, Yes)

reg r hypothetical game1first hxg1 age crt female i.sesiones_4 if study2 == 1, vce(robust)
outreg2 using tableA3, append excel label bdec(4) stat(coef se pval) paren(se) bracket(pval) ///
    keep(hypothetical game1first hxg1 age crt female) ///
    sortvar(hypothetical game1first hxg1 age crt female) ///
    addtext(Session FE, Yes)

* Outcome: RiskD
reg riskd hypothetical game1first i.sesiones_4 if study2 == 1, vce(robust)
outreg2 using tableA3, append excel label bdec(4) stat(coef se pval) paren(se) bracket(pval) ///
    keep(hypothetical game1first) ///
    sortvar(hypothetical game1first) ///
    addtext(Session FE, Yes)

reg riskd hypothetical game1first age crt female i.sesiones_4 if study2 == 1, vce(robust)
outreg2 using tableA3, append excel label bdec(4) stat(coef se pval) paren(se) bracket(pval) ///
    keep(hypothetical game1first age crt female) ///
    sortvar(hypothetical game1first age crt female) ///
    addtext(Session FE, Yes)

reg riskd hypothetical game1first hxg1 i.sesiones_4 if study2 == 1, vce(robust)
outreg2 using tableA3, append excel label bdec(4) stat(coef se pval) paren(se) bracket(pval) ///
    keep(hypothetical game1first hxg1) ///
    sortvar(hypothetical game1first hxg1) ///
    addtext(Session FE, Yes)

reg riskd hypothetical game1first hxg1 age crt female i.sesiones_4 if study2 == 1, vce(robust)
outreg2 using tableA3, append excel label bdec(4) stat(coef se pval) paren(se) bracket(pval) ///
    keep(hypothetical game1first hxg1 age crt female) ///
    sortvar(hypothetical game1first hxg1 age crt female) ///
    addtext(Session FE, Yes)
